package com.zeng.springsecurity.config;

import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Zqm
 * @Title: MyBatisScannerConfig
 * @ProjectName springsecurity_1
 * @date 2018/8/7
 *
 * 配置自动扫描包dao 位置
 */

@Configuration
public class MyBatisScannerConfig {


    @Bean
    public MapperScannerConfigurer MapperScannerConfigurer() {
        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
        mapperScannerConfigurer.setBasePackage("com.zeng.springsecurity.dao");
        mapperScannerConfigurer.setSqlSessionFactoryBeanName("sqlSessionFactory");
        return mapperScannerConfigurer;
    }
}
